private ["_pos1","_pos2","_ret"];
_pos1 = _this select 0;
_pos2 = _this select 1;

if (typename _pos1 == "OBJECT") then {_pos1 = getposASL _pos1};
if (typename _pos2 == "OBJECT") then {_pos2 = getposASL _pos2};

_pos1 set [2,0];
_pos2 set [2,0];

_pos1 distance _pos2